-
Notifications
You must be signed in to change notification settings - Fork 1.3k
dockerfile: add subrequest for converting LLB contents for dockerfile #6295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I wasn't sure whether this would be good as a PR but I've now used it for debugging two issues related to dockerfile so I figured it might be worth adding. |
f7803ed to
e14c856
Compare
| "google.golang.org/protobuf/encoding/protojson" | ||
| ) | ||
|
|
||
| const RequestDumpLLB = "frontend.dumpllb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "convertllb", or just "llb" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| if err != nil { | ||
| return nil, err | ||
| } | ||
| res.AddMeta("result.json", dt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does buildx still print this out correctly by default if there is no result.txt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does.
|
One thing that is slightly weird about this is that we are leaving the responsibility of returning |
This subrequest is similar to `buildctl debug dump-llb` but works on a running buildkit daemon with the dockerfile frontend. The `--call=convertllb` option can be used to dump the raw LLB along with the metadata and anything else in the definition to a JSON format. This is useful for debugging purposes. Signed-off-by: Jonathan A. Sternberg <[email protected]>
e14c856 to
1cdfd79
Compare
This subrequest is similar to
buildctl debug dump-llbbut works on arunning buildkit daemon with the dockerfile frontend. The
--call=convertllboption can be used to dump the raw LLB along with themetadata and anything else in the definition to a JSON format.
This is useful for debugging purposes.